package eai.tp2.lpco.web.beans;

import java.util.ArrayList;
import java.util.List;

public class Cart {

	private List<String> cart = new ArrayList<String>();
	
	public boolean addCameraToCart(String name) {		
		if(!cartContains(name)) {
			cart.add(name);
			return true;
		}
		return false;
	}	
	
	public boolean removeCameraToCart(String name) {		
		if(cartContains(name)) {
			cart.remove(name);
			return true;
		}
		return false;
	}
	
	public boolean cartContains(String name) {
		if(cart.contains(name))
			return true;
		return false;
	}
	
	public List<String> getCart() {
		return this.cart;
	}
}
